package com.lucker.ds.model;

/**
 * cai_piao_bet_type
 * @author 
 */
public class CaiPiaoBetType extends BaseValueObject {
    private Long id;

    /**
     * 玩法大类名称
     */
    private String groupName;

    /**
     * 玩法大类ID
     */
    private Integer groupId;

    /**
     * 彩种大类ID
     */
    private String caiTypeId;

    /**
     * 玩法名称
     */
    private String name;

    /**
     * 奖金
     */
    private String bouns;

    /**
     * 玩法ID
     */
    private Long typeId;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public String getCaiTypeId() {
        return caiTypeId;
    }

    public void setCaiTypeId(String caiTypeId) {
        this.caiTypeId = caiTypeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBouns() {
        return bouns;
    }

    public void setBouns(String bouns) {
        this.bouns = bouns;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByGroupName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by group_name asc";
            }else{
                this.orderStr = this.orderStr + ",group_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by group_name desc";
            }else{
                this.orderStr = this.orderStr + ",group_name desc";
            }
        }
    }

    public void orderByGroupId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by group_id asc";
            }else{
                this.orderStr = this.orderStr + ",group_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by group_id desc";
            }else{
                this.orderStr = this.orderStr + ",group_id desc";
            }
        }
    }

    public void orderByCaiTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id desc";
            }
        }
    }

    public void orderByName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by name asc";
            }else{
                this.orderStr = this.orderStr + ",name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by name desc";
            }else{
                this.orderStr = this.orderStr + ",name desc";
            }
        }
    }

    public void orderByBouns(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bouns asc";
            }else{
                this.orderStr = this.orderStr + ",bouns asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bouns desc";
            }else{
                this.orderStr = this.orderStr + ",bouns desc";
            }
        }
    }

    public void orderByTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by type_id asc";
            }else{
                this.orderStr = this.orderStr + ",type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by type_id desc";
            }else{
                this.orderStr = this.orderStr + ",type_id desc";
            }
        }
    }
}